<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let promise = new Promise((resolve,reject) => {
         //resolve("成功了")
          reject("失败了")
        })
        console.log(promise)
        // Promise {<fulfilled>:成功了}
        promise.then(result=>{
            console.log("result:",result)
        }).catch(error => {
            console.log("error:",error)
        }).finally(()=> {
            console.log("异步执行结束")
        })
    </script>
</body>
</html>